//用于修改进度条
import mitt from 'mitt'
import {computed} from 'vue'
import {useStore} from 'vuex'
export default function useProgress(type,list){
  const store=useStore()
  const getCurrentTime=computed(()=>{
    return dayjs(parseInt(playMusicList.currentTimes*1000)).format('mm:ss')
  })
  const getSumTime=computed(()=>{
    return dayjs(parseInt(playMusicList.SumTime)).format('mm:ss')
  })
  const getCurrentWidth=computed(()=>{
    return (store.state.currentTime/store.state.playlist[store.state.playCurrentIndex].dt)*4060+'rem'
  })
  return {getCurrentTime,getSumTime,getCurrentWidth}
}

